package com.privatebar.study.controller;

import com.privatebar.study.entity.Test;
import com.privatebar.study.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/test/")
public class TestController {

    @Autowired
    private TestService testService;

    @RequestMapping(value = "getAll", method = RequestMethod.GET)
    public List<Test> getAll() {
        List<Test> all = testService.getAll();
        return all;
    }

}
